//用于给用户选择要进入哪个项目的grid的store
var indexBeforeChooseProjectGridStore= Ext.create('Ext.data.Store', {
	proxy : {
		type : 'ajax',
		url:zuulUrl+'/'+testServiceName+'/testProject/common/userIn/'+currentUserId,
		reader : {
			type: 'json'
		},
		extractResponseData: function (response) {
            var data = response.responseJson;
            Ext.each(data, function (record) {
            	record.groupIdNameLeader=record.groupId+record.groupName+'(组长:'+record.groupLeaderName+')';
            });
            return data;
        }
	},
	groupField : 'groupIdNameLeader',
	autoLoad:true
});

//用于给用户选择要报名哪个班级的grid的store
var indexBeforeChooseEnterClassesGridStore= Ext.create('Ext.data.Store', {
    proxy : {
        type : 'ajax',
        url:zuulUrl+'/'+authServiceName+'/user/classesStore/'+currentUserId,
        reader : {
            type: 'json'
        },
        // extractResponseData: function (response) {
        //     var data = response.responseJson;
        //     Ext.each(data, function (record) {
        //         record.countStatus=record.nowCount+'/'+record.maxMemberCount;
        //     });
        //     return data;
        // }
    },
    autoLoad:true
});

//任务状态store
var statusStore = Ext.create('Ext.data.Store', {
    fields: [
        {name: 'statusNum', type: 'int'},
        {name: 'statusName', type: 'string'}
    ],
    proxy: {
        type: 'ajax',
        url: zuulUrl+'/'+taskServiceName+'/allTaskStatus',//请求
        reader: {
            type: 'json'
        }
    },
    sortable: true,//开启排序
    sorters: [{property: "statusNum", direction: "DESC"}], //根据STATUS_NUM来降序
    autoLoad: true//创建后自动调用此存储的加载方法，不加不会去请求
});